<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
<title><?php echo C('WEB_SITE_TITLE');?></title>
<link href="/M/Public/static/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="/M/Public/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/M/Public/static/bootstrap/css/docs.css" rel="stylesheet">
<link href="/M/Public/static/bootstrap/css/onethink.css" rel="stylesheet">
<link href="/M/Public/static/bootstrap/css/common.css" rel="stylesheet">

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/M/Public/static/bootstrap/js/html5shiv.js"></script>
<![endif]-->

<!--[if lt IE 9]>
<script type="text/javascript" src="/M/Public/static/jquery-1.10.2.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script type="text/javascript" src="/M/Public/static/jquery-1.8.2.js"></script>
<!-- styles needed by jScrollPane -->
<link type="text/css" href="/M/Public/static/scroll/jquery.jscrollpane.css" rel="stylesheet" />

<!-- the mousewheel plugin - optional to provide mousewheel support -->
<script type="text/javascript" src="/M/Public/static/scroll/jquery.mousewheel.js"></script>

<!-- the jScrollPane script -->
<script type="text/javascript" src="/M/Public/static/scroll/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" src="/M/Public/static/bootstrap/js/bootstrap.min.js"></script>
<script src="/M/Public/static/jquery.contextmenu.r2.js" type="text/javascript"></script>
<script src="/M/Public/static/artdialog/artDialog.js" type="text/javascript"></script>
<script src="/M/Public/static/jquery.contextmenu.r2.js" type="text/javascript"></script>
<script type="text/javascript" src="/M/Public/static/bootstrap/js/common.js"></script>
<script src="/M/Public/static/artdialog/iframeTools.source.js" type="text/javascript"></script>
<link href="/M/Public/static/artdialog/skins/default.css" rel="stylesheet">
<?php if(is_login()): ?><script src="http://192.168.1.42:3000/socket.io/socket.io.js"></script>
<script src='http://192.168.1.42:3000/javascripts/common.js'></script>
<script>
	$(function(){
		socket.send('<?php echo get_username();?>');
	})
</script>
<?php else: endif; ?>
<!--<![endif]-->
<!-- 页面header钩子，一般用于加载插件CSS文件和代码 -->
<?php echo hook('pageHeader');?>

</head>
<body>
	<!-- 头部 -->
	<!-- 导航条
================================================== -->

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="<?php echo U('index/index');?>">OA-让工作更加简单</a>
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <div class="nav-collapse collapse">
                <ul class="nav">
                    <?php $__NAV__ = D('Channel')->lists(); if(is_array($__NAV__)): $i = 0; $__LIST__ = $__NAV__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$nav): $mod = ($i % 2 );++$i;?><li>
                            <a href="<?php echo (get_nav_url($nav["url"])); ?>"><?php echo ($nav["title"]); ?></a>
                        </li><?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
            </div>
            <div class="nav-collapse collapse pull-right">
                <?php if(is_login()): ?><ul class="nav" style="margin-right:0">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding-left:0;padding-right:0"><?php echo get_username();?> <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="<?php echo U('User/profile');?>">修改密码</a></li>
                                <li><a href="<?php echo U('User/logout');?>">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                <?php else: ?>
                    <ul class="nav" style="margin-right:0">
                        <li>
                            <!-- <a href="<?php echo U('User/login');?>">登录</a> -->
							<a href="javascript:windowLogin('/M/index.php?s=/Home/user/login');">登录</a>
                        </li>
                        <li>
                            <a href="<?php echo U('User/register');?>" style="padding-left:0;padding-right:0">注册</a>
                        </li>
                        <li>
							<a href="javascript:;" class="glyphicon glyphicon-envelope mail" style="font-size:18px;" data-html=true data-content="<span class='label label-info'>admin</span><span class='label label-info'>minglei1202</span>" data-placement="bottom" data-toggle="popover" data-original-title="未读邮件"></a>
                        </li>
                    </ul><?php endif; ?>
            </div>
        </div>
    </div>
</div>

	<!-- /头部 -->
	
	<!-- 主体 -->
	
    <header class="jumbotron subhead" id="overview">
		<div class="container">
			<h2><?php echo ($info["title"]); ?></h2>
			<p>
				<span  class="pull-left">
					<span class="author"><?php echo (get_username($info["uid"])); ?></span>
					<span> 发表于 <?php echo (date('Y-m-d H:i',$info["create_time"])); ?></span>
				</span>
				<span class="pull-right">
					<?php $prev = D('Document')->prev($info); if(!empty($prev)): ?><a href="<?php echo U('?id='.$prev['id']);?>">上一篇</a><?php endif; ?>
                    <?php $next = D('Document')->next($info); if(!empty($next)): ?><a href="<?php echo U('?id='.$next['id']);?>">下一篇</a><?php endif; ?>
				</span>
			</p>
		</div>
	</header>

<div id="main-container" class_bak="container" class="desktop">
    
    <div class="span9 main-content">
        <!-- Contents
        ================================================== -->
        <section id="contents"><?php echo ($info["content"]); ?></section>
        <hr/>
	
		<?php $__PARTLIST__ = D('Document')->part($info['id'], $page, ''); if(is_array($__PARTLIST__)): $i = 0; $__LIST__ = $__PARTLIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$partlist): $mod = ($i % 2 );++$i;?><div class="clearfix">
				<div class="pull-left clearfix"><?php echo ($i*$page); ?>楼</div>
                <div class="pull-right clearfix">
                    <a href="javascript:;"><?php echo (get_username($partlist["uid"])); ?></a>
                    <span>发表于 <?php echo (date('Y/m/d',$partlist["create_time"])); ?></span>
                </div>
			</div>
			<p><?php echo ($partlist["content"]); ?></p>
    		<hr/><?php endforeach; endif; else: echo "" ;endif; ?>
		<!-- 回复表单 -->
        <div class="control-group">
            <form action="<?php echo U('save');?>" method="post">
            	<textarea name="content" rows="5" class="span9"> </textarea>
            	<input type="hidden" name="title" value="RE:<?php echo ($info["title"]); ?>">
                <input type="hidden" name="description" value="">
            	<input type="hidden" name="model_id" value="1">
				<input type="hidden" name="category_id" value="<?php echo ($info["category_id"]); ?>">
				<input type="hidden" name="pid" value="<?php echo ($info["id"]); ?>">
				<input type="hidden" name="type" value="3">
				<input type="hidden" name="parse" value="0">
            	<div> 
            	    <button class="btn">发表回复</button>
            	</div>
            </form>
            <?php echo hook('topicComment', array('name'=>'content'));?>
        </div>
    </div>

</div>
<script type="text/javascript">
    $(function(){
        $(window).resize(function(){
            $("#main-container").css("min-height", $(window).height() - 343);
        }).resize();
    })
</script>
	<!-- /主体 -->
</body>
</html>